<template>
  <div class="hello">
    <button @click="count += 1">点击:count = {{ count }}</button>
    <button @click="clickHandle">按钮</button>
    <p>{{ message }}</p>
    <button @click="say('hi')">say hi</button>
    <button @click="say('what')">say what</button>
    <ul>
      <li @click="clickNameHandle(item)" v-for="(item,index) in name":key = index>{{ item }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data(){
    return{
      count:1,
      message:"消息通知",
      name:["lwc","zjw","yw"]
    }
  },
  methods:{
    clickHandle(event){
      this.message = "消息被撤回";
      console.log(event);
      event.target.innerHTML = "点击之后"; 
    },
    say(item){
      console.log(item);
      
    },
    clickNameHandle(item){
      console.log(item);
      
    }
    
  }
}
</script>

